from llm import NovelLLM
from util import writeFile
from .base import BaseNode

class Step7Node(BaseNode):
    def run(self, state):
        prompt = "第七步：人物宝典\n当前完整大纲：{outline}\n请深入研究每个主要人物，记录外貌、性格、心理等详细信息".format(outline=state['step6_output'])
        result = NovelLLM().call_llm(prompt, caller_name="Step7")
        state['step7_output'] = result
        writeFile("output/step7.txt", result)
        print(f"Step7 完成人物宝典生成")
        return state